package com.ruoyi.production.service.impl.greenhousefilm;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.greenhousefilm.GreenhousefilmApplyTemporary;
import com.ruoyi.production.mapper.greenhousefilm.GreenhousefilmApplyTemporaryMapper;
import com.ruoyi.production.service.greenhousefilm.IGreenhousefilmApplyTemporaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 棚膜临时申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class GreenhousefilmApplyTemporaryServiceImpl implements IGreenhousefilmApplyTemporaryService
{
    @Autowired
    private GreenhousefilmApplyTemporaryMapper greenhousefilmApplyTemporaryMapper;

    /**
     * 查询棚膜临时申请
     *
     * @param greenhousefilmApplyTemporaryId 棚膜临时申请ID
     * @return 棚膜临时申请
     */
    @Override
    public GreenhousefilmApplyTemporary selectGreenhousefilmApplyTemporaryById(Long greenhousefilmApplyTemporaryId)
    {
        return greenhousefilmApplyTemporaryMapper.selectGreenhousefilmApplyTemporaryById(greenhousefilmApplyTemporaryId);
    }

    /**
     * 查询棚膜临时申请列表
     *
     * @param greenhousefilmApplyTemporary 棚膜临时申请
     * @return 棚膜临时申请
     */
    @Override
    public List<GreenhousefilmApplyTemporary> selectGreenhousefilmApplyTemporaryList(GreenhousefilmApplyTemporary greenhousefilmApplyTemporary)
    {
        return greenhousefilmApplyTemporaryMapper.selectGreenhousefilmApplyTemporaryList(greenhousefilmApplyTemporary);
    }

    /**
     * 新增棚膜临时申请
     *
     * @param greenhousefilmApplyTemporary 棚膜临时申请
     * @return 结果
     */
    @Override
    public int insertGreenhousefilmApplyTemporary(GreenhousefilmApplyTemporary greenhousefilmApplyTemporary)
    {











        greenhousefilmApplyTemporary.setCreateTime(DateUtils.getNowDate());



        return greenhousefilmApplyTemporaryMapper.insertGreenhousefilmApplyTemporary(greenhousefilmApplyTemporary);
    }

    /**
     * 修改棚膜临时申请
     *
     * @param greenhousefilmApplyTemporary 棚膜临时申请
     * @return 结果
     */
    @Override
    public int updateGreenhousefilmApplyTemporary(GreenhousefilmApplyTemporary greenhousefilmApplyTemporary)
    {
        greenhousefilmApplyTemporary.setUpdateTime(DateUtils.getNowDate());
        return greenhousefilmApplyTemporaryMapper.updateGreenhousefilmApplyTemporary(greenhousefilmApplyTemporary);
    }

    /**
     * 批量删除棚膜临时申请
     *
     * @param greenhousefilmApplyTemporaryIds 需要删除的棚膜临时申请ID
     * @return 结果
     */
    @Override
    public int deleteGreenhousefilmApplyTemporaryByIds(Long[] greenhousefilmApplyTemporaryIds)
    {
        return greenhousefilmApplyTemporaryMapper.deleteGreenhousefilmApplyTemporaryByIds(greenhousefilmApplyTemporaryIds);
    }

    /**
     * 删除棚膜临时申请信息
     *
     * @param greenhousefilmApplyTemporaryId 棚膜临时申请ID
     * @return 结果
     */
    @Override
    public int deleteGreenhousefilmApplyTemporaryById(Long greenhousefilmApplyTemporaryId)
    {
        return greenhousefilmApplyTemporaryMapper.deleteGreenhousefilmApplyTemporaryById(greenhousefilmApplyTemporaryId);
    }
}
